<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="utf-8" />
        <title>BarChart - ESUI Demo</title>
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="../../../dep/esui/3.2.0-beta.2/demo/assets/google-code-prettify/prettify.css"/>
        <link rel="stylesheet" href="assets/themes/standard.css" />
        <!--[if lt IE 9]>
        <link rel="stylesheet" href="../../../dep/esui/3.2.0-beta.2/demo/assets/ie8.css"/>
        <![endif]-->
    </head>
<body>
    <div class="header">
        <h1 id="branding">ESUI Drawer</h1>
    </div>
    <div class="ui-g main-container">
        <div id="side-bar" class="ui-u-1-5">
            <ul id="navigator" class="ui-nav">
            </ul>
        </div>
        <div id="main" class="ui-u-4-5">
            <h2>Drawer</h2>
            <p>Drawer</p>
            <div class="example">
                <h3>展开抽屉 - from Right</h3>
                <button id="btn" class="ui-button" type="button">展开</button>
                <h3>展开抽屉 - from Left</h3>
                <button id="btn2" class="ui-button" type="button">展开</button>
                <h3>展开抽屉 - from Bottom</h3>
                <button id="btn3" class="ui-button" type="button">展开</button>

                <div class="ui-drawer" data-ui-type="Drawer" data-ui-id="panel" data-ui-width="80%">
                    <div data-role="header">
                        <div data-role="title">From Right</div>
                        <a href="#" data-role="close"><span class="ui-icon-close"></span></a>
                    </div>
                    <div data-role="content">
                    </div>
                </div>

                <div class="ui-drawer" data-ui-type="Drawer" data-ui-id="panel2"
                    data-ui-variants="from-left">
                    <div data-role="header">
                        <div data-role="title">From Left</div>
                        <a href="#" data-role="close"><span class="ui-icon-close"></span></a>
                    </div>
                    <div data-role="content">
                    </div>
                    <div data-role="footer">
                        <button type="button" class="ui-button ui-button-primary">
                            确定
                        </button>
                        <button type="button" class="ui-button ui-button-link">
                            取消
                        </button>
                    </div>
                </div>

                <div class="ui-drawer" data-ui-type="Drawer" data-ui-id="panel3"
                    data-ui-variants="from-bottom">
                    <div data-role="header">
                        <div data-role="title">From Bottom</div>
                        <a href="#" data-role="close"><span class="ui-icon-close"></span></a>
                    </div>
                    <div data-role="content">
                    </div>
                    <div data-role="footer">
                        <button type="button" class="ui-button ui-button-primary">
                            确定
                        </button>
                        <button type="button" class="ui-button ui-button-link">
                            取消
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="../../../dep/esui/3.2.0-beta.2/demo/assets/loader/esl.js"></script>
    <script src="config.js"></script>
    <script src="../../../dep/esui/3.2.0-beta.2/demo/demo.js"></script>
    <script src="../../../dep/esui/3.2.0-beta.2/demo/assets/google-code-prettify/prettify.js"></script>
    <script id="main-js">
    require(
        [
            'esui',
            'Drawer',
            'demo',
            'esui/Tab'
        ],
        function (ui) {
            ui.init();
            document.getElementById('btn').onclick = function () {
                ui.get('panel').show();
            };
            document.getElementById('btn2').onclick = function () {
                ui.get('panel2').show();
            };
            var panel = ui.get('panel3');
            panel.on('beforeclose', function (e) {
                if (!window.confirm('确认关闭吗？')) {
                    e.preventDefault();
                }
            });
            document.getElementById('btn3').onclick = function () {
                panel.show();
            };
        }
    );
    </script>
    <script src="sitemap.js"></script>

</body>
</html>